<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>4 模板语法-插值-HTML</title>
    <script src="js/vue.global.js"></script>
</head>
<body>
<div id="example1" class="demo">
    <p>使用双大括号的文本插值: {{ rawHtml }}</p>
    <p>使用 v-html 指令: <span v-html="rawHtml"></span></p>
</div>

<script>
    const RenderHtmlApp = {
        data() {
            return {
                rawHtml: '<span style="color: red">这里会显示红色！</span>'
            }
        }
    }

    Vue.createApp(RenderHtmlApp).mount('#example1')
</script>
</body>
</html>